﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace PPI.Data
{
    public class DCheckDatabaseConnection
    {
        public static bool CheckConnection(string connectionKey)
        {
            SqlConnection c = null;
            try
            {
                c = DBHelper.GetConnection(connectionKey);
                return true;
            }
            catch (Exception ex)
            {
                return false;
            }
            finally
            {
                if (c != null)
                {
                    c.Close();
                }
            }
            
        }
    }
}
